.box1 {
  background: lightblue;
  height: 500px;
  position: relative;
}

.ib1 {
  height: 100px;
  width: 100px;
  background: red;
  position: absolute;
  top: 10px;
  left: 10px;
}

.fix {
  width: 100px;
  height: 100px;
  background-color: green;
  position: fixed;
  right: 0;
  bottom: 50%;
  z-index: 10000000;
  margin-bottom: -50px;
}